home *** CD-ROM | disk | FTP | other *** search
- /*
- File: BndNSUtl.h
-
- Contains: Binding utilities for EditorSetup.
-
- Owned by: Caia Grisar
-
- Copyright: © 1993 - 1995 by Apple Computer, Inc., all rights reserved.
-
- */
-
-
- #ifndef _BNDNSUTL_
- #define _BNDNSUTL_
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- #ifndef _PLFMFILE_
- #include "PLFMFile.h"
- #endif
-
- //==============================================================================
- // Classes used by this interface
- //==============================================================================
- class ODTypeList;
- class EditorSet;
- class ODNameSpaceManager;
- class ODStorageUnitView;
- class ODPart;
-
- //==============================================================================
- // functions
- //==============================================================================
- extern "C" {
-
- ODEditor SetSysPrefEditorForKind(ODNameSpaceManager* theNameSpaceManager,
- ODType kind, ODEditor editor);
- // Sets the system-wide preferred editor for the argument data kind.
- // This routine will overwrite any preference set by the user.
-
- ODEditor SetSysPrefEditorForCategory(ODNameSpaceManager* theNameSpaceManager,
- ODType category,ODEditor editor);
- // Sets the system-wide preferred editor for the argument data category.
- // This routine will overwrite any preference set by the user.
-
- ODEditor GetSysPrefEditorForKind(ODNameSpaceManager* theNameSpaceManager,
- ODType kind);
- // Returns the system-wide preferred editor for the argument data kind.
- // A null value is returned if no preference has been specified.
- // This routine checks to ensure that the preferred editor actually exists;
- // if it does not, the preference is canceled and null is returned.
-
- ODEditor GetSysPrefEditorForCategory(ODNameSpaceManager* theNameSpaceManager,
- ODType category);
- // Returns the system-wide preferred editor for the argument data category.
- // A null value is returned if no preference has been specified.
-
- ODTypeList* GetCategoriesOfKind(ODNameSpaceManager* theNameSpaceManager,
- ODType kind);
- // Returns the categories of the argument data kind, in the content of the
- // argument storage unit. The client must dispose of the result.
-
- ODBoolean GetUserKindFromKind( ODNameSpaceManager* theNameSpaceManager,
- ODType kind, ODName** name );
- ODBoolean GetUserEditorFromEditor( ODNameSpaceManager* theNameSpaceManager,
- ODType editor, ODName** name );
- ODBoolean GetUserCatFromCat( ODNameSpaceManager* theNameSpaceManager,
- ODType category, ODName** name );
-
- ODOSType ODGetODOSTypeForKind(ODNameSpaceManager* theNmSpcMgr, ODType kind);
-
- ODBoolean EditorSupportsKind( ODNameSpaceManager* theNameSpaceManager,
- ODEditor editor, ODType kind );
- // Returns true if the argument editor supports the argument data type
- // without translation.
-
- ODBoolean GetAllEditorsForCategory( ODNameSpaceManager* theNameSpaceManager,
- ODType category, EditorSet* theEditorSet );
- // Returns the set of Editors supporting the argument data category without translation.
-
- ODBoolean GetAllEditorsForKind(ODNameSpaceManager* theNameSpaceManager,
- ODType kind, EditorSet* theEditorSet);
- // Returns the set of Editors supporting the argument data kind without translation.
-
- void GetAllKindsForEditor(ODNameSpaceManager* theNmSpcMgr,
- ODTypeList* kindList, ODEditor editorID);
-
- ODULong ReadSize(ODFileRefNum file, ODStorageUnitView* view);
-
- void ReadBytes(ODFileRefNum file, ODStorageUnitView* view,
- ODPtr bytes, ODULong* length);
-
- EditorSet* ODGetEditorSetFromResFile(ODSShort resRefNum);
-
- // Returns the set of Editors IDs (if any) found in this file
-
- EditorSet* ODGetEditorSetFromNMAP(ODHandle nmap );
-
- } // End of extern "C" {
-
- #endif // _BNDNSUTL_
-